﻿@model TaskManager.Sprint
@{
    Layout = null;
}

<div style="margin: 5px 5px 5px 5px;">
    <a id="saveButton" class="k-button" href="#">Save</a>
</div>

<form id="sprintForm">
    @Html.HiddenFor(m => m.SprintId)

    <fieldset><legend>Dates</legend>
        Server-side validation:
        <ul>
            <li>The start and end dates are validated to determine whether they overlap with the dates of another sprint.  Try changing the dates to overlap another sprint and save.</li>
        </ul>
        <div class="tm-field" style="width:100px;"><span>Start Date:</span></div><div class="tm-field">@Html.TextBoxFor(m => m.StartDate)</div>
        <div class="tm-field" style="width:20px;">&nbsp;</div>
        <div class="tm-field" style="width:100px;"><span>End Date:</span></div><div class="tm-field">@Html.TextBoxFor(m => m.EndDate)</div>
    </fieldset>
</form>

<fieldset><legend>Tasks</legend>
    Client-side Validations:
    <ul>
        <li>The Description is a required field.</li>
        <li>The Estimated Hours cannot be negative.</li>
        <li>The Completed date is a required field and needs to be between the Start date and End date.  Try changing the Completed date to see the validation in action.</li>
    </ul>
    <div id="taskGrid"></div>
</form>

<div id="messageWindow"></div>

<script src="@Url.Content("~/Scripts/Sprint.js")" type="text/javascript"></script>
<script type="text/javascript">
    Sprint.init();
</script>